import QtQuick
import QtQuick.Layouts
import QtCharts

Rectangle {
    Layout.fillWidth: true
    Layout.fillHeight: true

    ChartView {
        id: chartView
        title: "柱形图分类坐标轴示例"
        titleFont.bold: true
        titleFont.pointSize: 14

        anchors.fill: parent
        antialiasing: true

        BarCategoryAxis {
            id: valueAxisX
            categories: ["一月", "二月", "三月", "四月"]
            titleText: "X Title"
        }

        ValueAxis {
            id: valueAxisY
            min: 0
            max: 20
            titleText: "Y Title"
        }

        BarSeries {
            name: "柱形图分类坐标轴示例"
            axisX: valueAxisX
            axisY: valueAxisY

            BarSet {
                label: "bar"
                values: [10, 15, 12, 18]
            }
        }
    }
}
